@use "sass:color";
@use 'src/components/style/foundation/typography' as typography;
@use 'src/components/style/foundation/colors' as colors;
@use 'src/components/style/foundation/spacing' as spacing;

:global {
  .ais-CurrentRefinements-list {
    padding-left: 0;
    margin: 0;
    background-color: transparent;
    display: block;
  }

  .ais-CurrentRefinements-item {
    list-style: none;
    display: inline-block;
  }

  .ais-CurrentRefinements-list .ais-CurrentRefinements-category {
    display: inline-block;
    margin-right: spacing.spacing(base);
    margin: spacing.spacing(extra-tight) spacing.spacing(base) spacing.spacing(extra-tight) 0;
    background-color: colors.color(gray, lighter);
    color: colors.color(gray, dark);
    padding: 0.3em 0.7em;
    border-radius: 20px;
    font-size: 0.8em;
    transition: all 100ms linear;

    :global(.theme--dark) & {
      background-color: colors.color(gray, dark);
      color: white
    }
  }

  .ais-CurrentRefinements-list .ais-CurrentRefinements-category:hover {
    background-color: colors.color(gray);
    color: white;
  }

  .ais-CurrentRefinements-label {
    display: none;
  }

  .ais-CurrentRefinements-categoryLabel,
  .ais-CurrentRefinements-label {
    vertical-align: middle;
    line-height: 1.5;
  }

  .ais-CurrentRefinements-delete {
    vertical-align: middle;
    appearance: none;
    margin-left: spacing.spacing(tight);
    background-color: color.adjust(colors.color(gray), $lightness: 20%);
    border-radius: 30px;
    border: none;
    display: inline-block;
    position: relative;
    height: 15px;
    width: 15px;
    padding: 0;
    font-size: 12px;
    line-height: 12px;
    color: colors.color(gray, darker);
    transition: all 100ms linear;
  }

  .ais-CurrentRefinements-category:hover .ais-CurrentRefinements-delete {
    color: colors.color(gray);
    background-color: white;
  }
}
